package com.wang.port;


import java.util.ArrayList;
import java.util.List;

/**
 * Created by wangq on 2021/8/29.
 */
public class PollingPort {
    private static List<RpcPort> serverList = new ArrayList<>();

    private static PollingPort pollingPort = new PollingPort();

    private PollingPort() {
        serverList.add(new RpcPort("127.0.0.1", 9999));
        serverList.add(new RpcPort("127.0.0.1", 9998));
        serverList.add(new RpcPort("127.0.0.1", 9997));
    }

    public static PollingPort getInstance() {
        return pollingPort;
    }

    public RpcPort getPollingPort() {
        return new RpcPort();
    }

    public List<RpcPort> getServerList() {
        return serverList;
    }

    public void setServerList(List<RpcPort> serverList) {
        PollingPort.serverList = serverList;
    }
}
